home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / utilities / hypercard player / hypercard player 2.4 / audio help / background_13784.xml next >
Encoding:
Extensible Markup Language  |  1997-04-23  |  21.6 KB  |  490 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>13784</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_13962.pbm</bitmap>
  7.     <cantDelete> <true /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_3279.css" />
  11.     <part>
  12.         <id>83</id>
  13.         <type>button</type>
  14.         <visible> <true /> </visible>
  15.         <reserved5> 0 </reserved5>
  16.         <reserved4> 0 </reserved4>
  17.         <reserved3> 0 </reserved3>
  18.         <reserved2> 0 </reserved2>
  19.         <reserved1> 0 </reserved1>
  20.         <enabled> <true /> </enabled>
  21.         <rect>
  22.             <left>0</left>
  23.             <top>251</top>
  24.             <right>256</right>
  25.             <bottom>263</bottom>
  26.         </rect>
  27.         <style>transparent</style>
  28.         <showName> <true /> </showName>
  29.         <highlight> <false /> </highlight>
  30.         <autoHighlight> <false /> </autoHighlight>
  31.         <sharedHighlight> <true /> </sharedHighlight>
  32.         <family>0</family>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>center</textAlign>
  36.         <font>Geneva</font>
  37.         <textSize>9</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <name>---  More  ---</name>
  40.         <script>on mouseUp
  41. pass mouseUp
  42. end mouseUp</script>
  43.     </part>
  44.     <part>
  45.         <id>1</id>
  46.         <type>field</type>
  47.         <visible> <true /> </visible>
  48.         <dontWrap> <false /> </dontWrap>
  49.         <dontSearch> <false /> </dontSearch>
  50.         <sharedText> <false /> </sharedText>
  51.         <fixedLineHeight> <true /> </fixedLineHeight>
  52.         <autoTab> <true /> </autoTab>
  53.         <lockText> <true /> </lockText>
  54.         <rect>
  55.             <left>6</left>
  56.             <top>7</top>
  57.             <right>195</right>
  58.             <bottom>44</bottom>
  59.         </rect>
  60.         <style>transparent</style>
  61.         <autoSelect> <false /> </autoSelect>
  62.         <showLines> <false /> </showLines>
  63.         <wideMargins> <false /> </wideMargins>
  64.         <multipleLines> <false /> </multipleLines>
  65.         <reservedFamily> 0 </reservedFamily>
  66.         <titleWidth>0</titleWidth>
  67.         <icon>0</icon>
  68.         <textAlign>left</textAlign>
  69.         <font>Palatino</font>
  70.         <textSize>14</textSize>
  71.         <textStyle>bold</textStyle>
  72.         <textHeight>16</textHeight>
  73.         <name>Title</name>
  74.         <script></script>
  75.     </part>
  76.     <part>
  77.         <id>7</id>
  78.         <type>button</type>
  79.         <visible> <true /> </visible>
  80.         <reserved5> 0 </reserved5>
  81.         <reserved4> 0 </reserved4>
  82.         <reserved3> 0 </reserved3>
  83.         <reserved2> 0 </reserved2>
  84.         <reserved1> 0 </reserved1>
  85.         <enabled> <true /> </enabled>
  86.         <rect>
  87.             <left>187</left>
  88.             <top>269</top>
  89.             <right>212</right>
  90.             <bottom>288</bottom>
  91.         </rect>
  92.         <style>rectangle</style>
  93.         <showName> <false /> </showName>
  94.         <highlight> <false /> </highlight>
  95.         <autoHighlight> <true /> </autoHighlight>
  96.         <sharedHighlight> <true /> </sharedHighlight>
  97.         <family>0</family>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>20001</icon>
  100.         <textAlign>center</textAlign>
  101.         <font>Chicago</font>
  102.         <textSize>12</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <name>Prev</name>
  105.         <script>on mouseUp
  106. if word 2 of bkgnd field "Pages" is 1 then
  107. -- Going to previous section, so show visual effect.
  108. visual effect scroll right fast
  109. end if
  110. go previous card
  111. if the mouse is down then exit mouseUp -- trap double click
  112. end mouseUp</script>
  113.     </part>
  114.     <part>
  115.         <id>2</id>
  116.         <type>field</type>
  117.         <visible> <true /> </visible>
  118.         <dontWrap> <false /> </dontWrap>
  119.         <dontSearch> <false /> </dontSearch>
  120.         <sharedText> <false /> </sharedText>
  121.         <fixedLineHeight> <true /> </fixedLineHeight>
  122.         <autoTab> <false /> </autoTab>
  123.         <lockText> <true /> </lockText>
  124.         <rect>
  125.             <left>178</left>
  126.             <top>10</top>
  127.             <right>249</right>
  128.             <bottom>26</bottom>
  129.         </rect>
  130.         <style>transparent</style>
  131.         <autoSelect> <false /> </autoSelect>
  132.         <showLines> <false /> </showLines>
  133.         <wideMargins> <false /> </wideMargins>
  134.         <multipleLines> <false /> </multipleLines>
  135.         <reservedFamily> 0 </reservedFamily>
  136.         <titleWidth>0</titleWidth>
  137.         <icon>0</icon>
  138.         <textAlign>right</textAlign>
  139.         <font>Geneva</font>
  140.         <textSize>9</textSize>
  141.         <textStyle>plain</textStyle>
  142.         <textHeight>12</textHeight>
  143.         <name>Pages</name>
  144.         <script></script>
  145.     </part>
  146.     <part>
  147.         <id>60</id>
  148.         <type>button</type>
  149.         <visible> <true /> </visible>
  150.         <reserved5> 0 </reserved5>
  151.         <reserved4> 0 </reserved4>
  152.         <reserved3> 0 </reserved3>
  153.         <reserved2> 0 </reserved2>
  154.         <reserved1> 0 </reserved1>
  155.         <enabled> <true /> </enabled>
  156.         <rect>
  157.             <left>13</left>
  158.             <top>269</top>
  159.             <right>143</right>
  160.             <bottom>288</bottom>
  161.         </rect>
  162.         <style>rectangle</style>
  163.         <showName> <false /> </showName>
  164.         <highlight> <false /> </highlight>
  165.         <autoHighlight> <true /> </autoHighlight>
  166.         <sharedHighlight> <true /> </sharedHighlight>
  167.         <family>0</family>
  168.         <titleWidth>0</titleWidth>
  169.         <icon>0</icon>
  170.         <textAlign>center</textAlign>
  171.         <font>Palatino</font>
  172.         <textSize>12</textSize>
  173.         <textStyle>plain</textStyle>
  174.         <name></name>
  175.         <script></script>
  176.     </part>
  177.     <part>
  178.         <id>74</id>
  179.         <type>button</type>
  180.         <visible> <true /> </visible>
  181.         <reserved5> 0 </reserved5>
  182.         <reserved4> 0 </reserved4>
  183.         <reserved3> 0 </reserved3>
  184.         <reserved2> 0 </reserved2>
  185.         <reserved1> 0 </reserved1>
  186.         <enabled> <true /> </enabled>
  187.         <rect>
  188.             <left>38</left>
  189.             <top>269</top>
  190.             <right>143</right>
  191.             <bottom>288</bottom>
  192.         </rect>
  193.         <style>transparent</style>
  194.         <showName> <true /> </showName>
  195.         <highlight> <false /> </highlight>
  196.         <autoHighlight> <true /> </autoHighlight>
  197.         <sharedHighlight> <true /> </sharedHighlight>
  198.         <family>0</family>
  199.         <titleWidth>0</titleWidth>
  200.         <icon>0</icon>
  201.         <textAlign>center</textAlign>
  202.         <font>Palatino</font>
  203.         <textSize>12</textSize>
  204.         <textStyle>plain</textStyle>
  205.         <name>Main Topics</name>
  206.         <script></script>
  207.     </part>
  208.     <part>
  209.         <id>76</id>
  210.         <type>button</type>
  211.         <visible> <true /> </visible>
  212.         <reserved5> 0 </reserved5>
  213.         <reserved4> 0 </reserved4>
  214.         <reserved3> 0 </reserved3>
  215.         <reserved2> 0 </reserved2>
  216.         <reserved1> 0 </reserved1>
  217.         <enabled> <true /> </enabled>
  218.         <rect>
  219.             <left>13</left>
  220.             <top>269</top>
  221.             <right>57</right>
  222.             <bottom>288</bottom>
  223.         </rect>
  224.         <style>transparent</style>
  225.         <showName> <false /> </showName>
  226.         <highlight> <false /> </highlight>
  227.         <autoHighlight> <false /> </autoHighlight>
  228.         <sharedHighlight> <true /> </sharedHighlight>
  229.         <family>0</family>
  230.         <titleWidth>0</titleWidth>
  231.         <icon>20000</icon>
  232.         <textAlign>center</textAlign>
  233.         <font>Chicago</font>
  234.         <textSize>12</textSize>
  235.         <textStyle>plain</textStyle>
  236.         <name>Return Arrow</name>
  237.         <script></script>
  238.     </part>
  239.     <part>
  240.         <id>75</id>
  241.         <type>button</type>
  242.         <visible> <true /> </visible>
  243.         <reserved5> 0 </reserved5>
  244.         <reserved4> 0 </reserved4>
  245.         <reserved3> 0 </reserved3>
  246.         <reserved2> 0 </reserved2>
  247.         <reserved1> 0 </reserved1>
  248.         <enabled> <true /> </enabled>
  249.         <rect>
  250.             <left>13</left>
  251.             <top>269</top>
  252.             <right>143</right>
  253.             <bottom>288</bottom>
  254.         </rect>
  255.         <style>transparent</style>
  256.         <showName> <false /> </showName>
  257.         <highlight> <false /> </highlight>
  258.         <autoHighlight> <true /> </autoHighlight>
  259.         <sharedHighlight> <true /> </sharedHighlight>
  260.         <family>0</family>
  261.         <titleWidth>0</titleWidth>
  262.         <icon>0</icon>
  263.         <textAlign>center</textAlign>
  264.         <font>Palatino</font>
  265.         <textSize>12</textSize>
  266.         <textStyle>plain</textStyle>
  267.         <name>Return To Topics</name>
  268.         <script>on mouseUp
  269. push card
  270. goMainTopics
  271. end mouseUp</script>
  272.     </part>
  273.     <part>
  274.         <id>90</id>
  275.         <type>field</type>
  276.         <visible> <true /> </visible>
  277.         <dontWrap> <false /> </dontWrap>
  278.         <dontSearch> <false /> </dontSearch>
  279.         <sharedText> <false /> </sharedText>
  280.         <fixedLineHeight> <true /> </fixedLineHeight>
  281.         <autoTab> <false /> </autoTab>
  282.         <lockText> <true /> </lockText>
  283.         <rect>
  284.             <left>6</left>
  285.             <top>42</top>
  286.             <right>255</right>
  287.             <bottom>256</bottom>
  288.         </rect>
  289.         <style>transparent</style>
  290.         <autoSelect> <false /> </autoSelect>
  291.         <showLines> <false /> </showLines>
  292.         <wideMargins> <false /> </wideMargins>
  293.         <multipleLines> <false /> </multipleLines>
  294.         <reservedFamily> 0 </reservedFamily>
  295.         <titleWidth>0</titleWidth>
  296.         <icon>0</icon>
  297.         <textAlign>left</textAlign>
  298.         <font>Palatino</font>
  299.         <textSize>12</textSize>
  300.         <textStyle>plain</textStyle>
  301.         <textHeight>14</textHeight>
  302.         <name>Help Text</name>
  303.         <script>on mouseUp
  304. checkActiveText
  305. end mouseUp</script>
  306.     </part>
  307.     <part>
  308.         <id>91</id>
  309.         <type>field</type>
  310.         <visible> <false /> </visible>
  311.         <dontWrap> <false /> </dontWrap>
  312.         <dontSearch> <false /> </dontSearch>
  313.         <sharedText> <false /> </sharedText>
  314.         <fixedLineHeight> <true /> </fixedLineHeight>
  315.         <autoTab> <false /> </autoTab>
  316.         <lockText> <true /> </lockText>
  317.         <rect>
  318.             <left>12</left>
  319.             <top>49</top>
  320.             <right>239</right>
  321.             <bottom>234</bottom>
  322.         </rect>
  323.         <style>transparent</style>
  324.         <autoSelect> <false /> </autoSelect>
  325.         <showLines> <false /> </showLines>
  326.         <wideMargins> <false /> </wideMargins>
  327.         <multipleLines> <false /> </multipleLines>
  328.         <reservedFamily> 0 </reservedFamily>
  329.         <titleWidth>0</titleWidth>
  330.         <icon>0</icon>
  331.         <textAlign>left</textAlign>
  332.         <font>Palatino</font>
  333.         <textSize>12</textSize>
  334.         <textStyle>plain</textStyle>
  335.         <textHeight>14</textHeight>
  336.         <name>Help Text B</name>
  337.         <script>on mouseUp
  338. checkActiveText
  339. end mouseUp</script>
  340.     </part>
  341.     <part>
  342.         <id>8</id>
  343.         <type>button</type>
  344.         <visible> <true /> </visible>
  345.         <reserved5> 0 </reserved5>
  346.         <reserved4> 0 </reserved4>
  347.         <reserved3> 0 </reserved3>
  348.         <reserved2> 0 </reserved2>
  349.         <reserved1> 0 </reserved1>
  350.         <enabled> <true /> </enabled>
  351.         <rect>
  352.             <left>218</left>
  353.             <top>269</top>
  354.             <right>243</right>
  355.             <bottom>288</bottom>
  356.         </rect>
  357.         <style>rectangle</style>
  358.         <showName> <false /> </showName>
  359.         <highlight> <false /> </highlight>
  360.         <autoHighlight> <true /> </autoHighlight>
  361.         <sharedHighlight> <true /> </sharedHighlight>
  362.         <family>0</family>
  363.         <titleWidth>0</titleWidth>
  364.         <icon>20003</icon>
  365.         <textAlign>center</textAlign>
  366.         <font>Chicago</font>
  367.         <textSize>12</textSize>
  368.         <textStyle>plain</textStyle>
  369.         <name>Next</name>
  370.         <script>on mouseUp
  371. if word 2 of bkgnd field "Pages" is word 4 of bkgnd field "Pages" then
  372. -- Only show the visual effect when you go to a new section.
  373. visual effect scroll left fast
  374. end if
  375. go next card
  376. if the mouse is down then exit mouseUp -- trap double click
  377. end mouseUp</script>
  378.     </part>
  379.     <part>
  380.         <id>86</id>
  381.         <type>field</type>
  382.         <visible> <false /> </visible>
  383.         <dontWrap> <false /> </dontWrap>
  384.         <dontSearch> <false /> </dontSearch>
  385.         <sharedText> <false /> </sharedText>
  386.         <fixedLineHeight> <true /> </fixedLineHeight>
  387.         <autoTab> <false /> </autoTab>
  388.         <lockText> <true /> </lockText>
  389.         <rect>
  390.             <left>193</left>
  391.             <top>247</top>
  392.             <right>256</right>
  393.             <bottom>264</bottom>
  394.         </rect>
  395.         <style>rectangle</style>
  396.         <autoSelect> <false /> </autoSelect>
  397.         <showLines> <false /> </showLines>
  398.         <wideMargins> <false /> </wideMargins>
  399.         <multipleLines> <false /> </multipleLines>
  400.         <reservedFamily> 0 </reservedFamily>
  401.         <titleWidth>0</titleWidth>
  402.         <icon>0</icon>
  403.         <textAlign>left</textAlign>
  404.         <font>Geneva</font>
  405.         <textSize>9</textSize>
  406.         <textStyle>plain</textStyle>
  407.         <textHeight>12</textHeight>
  408.         <name>About this card</name>
  409.         <script>-- For information about the contents of this field, see the
  410. -- beginning of the script of this background.
  411.  
  412. on mouseUp
  413. hide me
  414. end mouseUp</script>
  415.     </part>
  416.     <part>
  417.         <id>97</id>
  418.         <type>button</type>
  419.         <visible> <false /> </visible>
  420.         <reserved5> 0 </reserved5>
  421.         <reserved4> 0 </reserved4>
  422.         <reserved3> 0 </reserved3>
  423.         <reserved2> 0 </reserved2>
  424.         <reserved1> 0 </reserved1>
  425.         <enabled> <true /> </enabled>
  426.         <rect>
  427.             <left>6</left>
  428.             <top>43</top>
  429.             <right>250</right>
  430.             <bottom>63</bottom>
  431.         </rect>
  432.         <style>opaque</style>
  433.         <showName> <true /> </showName>
  434.         <highlight> <true /> </highlight>
  435.         <autoHighlight> <false /> </autoHighlight>
  436.         <sharedHighlight> <true /> </sharedHighlight>
  437.         <family>0</family>
  438.         <titleWidth>0</titleWidth>
  439.         <icon>0</icon>
  440.         <textAlign>center</textAlign>
  441.         <font>Palatino</font>
  442.         <textSize>12</textSize>
  443.         <textStyle>plain</textStyle>
  444.         <name>Glossary</name>
  445.         <script></script>
  446.     </part>
  447.     <part>
  448.         <id>98</id>
  449.         <type>button</type>
  450.         <visible> <false /> </visible>
  451.         <reserved5> 0 </reserved5>
  452.         <reserved4> 0 </reserved4>
  453.         <reserved3> 0 </reserved3>
  454.         <reserved2> 0 </reserved2>
  455.         <reserved1> 0 </reserved1>
  456.         <enabled> <true /> </enabled>
  457.         <rect>
  458.             <left>11</left>
  459.             <top>46</top>
  460.             <right>27</right>
  461.             <bottom>60</bottom>
  462.         </rect>
  463.         <style>transparent</style>
  464.         <showName> <false /> </showName>
  465.         <highlight> <false /> </highlight>
  466.         <autoHighlight> <false /> </autoHighlight>
  467.         <sharedHighlight> <true /> </sharedHighlight>
  468.         <family>0</family>
  469.         <titleWidth>0</titleWidth>
  470.         <icon>3071</icon>
  471.         <textAlign>center</textAlign>
  472.         <font>Chicago</font>
  473.         <textSize>12</textSize>
  474.         <textStyle>plain</textStyle>
  475.         <name>Close box</name>
  476.         <script>on mouseDown
  477. set the icon of me to "Clicked Close Box"
  478. end mouseDown
  479.  
  480. on mouseUp
  481. set the icon of me to "Close Box"
  482. glossaryObjects false,"zoom in"
  483. end mouseUp
  484.  
  485. on mouseStillDown
  486. if the mouseLoc is not within the rect of me
  487. then set the icon of me to "Close Box"
  488. else set the icon of me to "Clicked Close Box"
  489. end mouseStillDown
  490. </script>
  491.     </part>
  492.     <part>
  493.         <id>99</id>
  494.         <type>field</type>
  495.         <visible> <false /> </visible>
  496.         <dontWrap> <false /> </dontWrap>
  497.         <dontSearch> <false /> </dontSearch>
  498.         <sharedText> <true /> </sharedText>
  499.         <fixedLineHeight> <true /> </fixedLineHeight>
  500.         <autoTab> <false /> </autoTab>
  501.         <lockText> <true /> </lockText>
  502.         <rect>
  503.             <left>6</left>
  504.             <top>63</top>
  505.             <right>250</right>
  506.             <bottom>261</bottom>
  507.         </rect>
  508.         <style>rectangle</style>
  509.         <autoSelect> <false /> </autoSelect>
  510.         <showLines> <false /> </showLines>
  511.         <wideMargins> <true /> </wideMargins>
  512.         <multipleLines> <false /> </multipleLines>
  513.         <reservedFamily> 0 </reservedFamily>
  514.         <titleWidth>0</titleWidth>
  515.         <icon>0</icon>
  516.         <textAlign>left</textAlign>
  517.         <font>Palatino</font>
  518.         <textSize>12</textSize>
  519.         <textStyle>plain</textStyle>
  520.         <textHeight>16</textHeight>
  521.         <name>Glossary Item</name>
  522.         <script></script>
  523.     </part>
  524.     <content>
  525.         <layer>background</layer>
  526.         <id>99</id>
  527.         <text><span class="style93">aveform</span><span class="style62">
  528.  
  529. A visual representation of sound which shows the volume of sound over time. The volume is shown on the vertical axis and time is shown on the horizontal axis.</span></text>
  530.     </content>
  531.     <name>Content</name>
  532.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû About This Background ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  533.  
  534. -- System Messages in this background script:
  535. -- openBackground, closeBackground, openCard, closeCard, mouseUp
  536.  
  537. -- Message Handlers in this background script:
  538. -- setCheckMark, goGray, goMainTopics, checkActiveText, printTopic,
  539. -- showGlossaryItem, formatGlossaryItem
  540.  
  541. -- Function Handlers in this background script:
  542. -- endOrMore, currentTopicInfo, getGlossaryItem
  543.  
  544. -- Hidden Objects in this background
  545. -- background field "About this card"
  546. ---- line 1 item 1 is an integer, the line number of this card's
  547. ---- main topic (in the field "Main Topics" in the background
  548. ---- "Main Topics").
  549. ---- line 1 item 2 is an integer, the line number of this card's
  550. ---- sub-topic (in the field "Section" in the background
  551. ---- "Main Topics").
  552. -- Three background buttons and fields make up the Glossary objects:
  553. -- the bkgnd button "Close box", bkgnd button "Glossary", and
  554. -- bkgnd field "Glossary Item". These objects appear when you click on
  555. -- group text. This scheme assumes you don't have card
  556. -- buttons or fields on the same card as some group text. (If you do,
  557. -- the the card buttons and fields will appear at the same time as
  558. -- the glossary.)
  559.  
  560. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  561.  
  562. ------‚Ä¢‚Ä¢  SYSTEM MESSAGES  ‚Ä¢‚Ä¢------
  563.  
  564. on openBackground
  565. global AudioHelpMenu
  566. setCheckMark true
  567. pass openBackground
  568. end openBackground
  569.  
  570. on closeBackground
  571. global AudioHelpMenu
  572. setCheckMark false
  573. pass closeBackground
  574. end closeBackground
  575.  
  576. on openCard
  577. set name of bkgnd button id 83 to endOrMore()
  578. pass openCard
  579. end openCard
  580.  
  581. on closeCard
  582. -- Close the glossary if it is open.
  583. if visible of bkgnd field "Glossary Item" then
  584. glossaryObjects false,"zoom in"
  585. end if
  586. pass closeCard
  587. end closeCard
  588.  
  589. on mouseUp
  590. -- Close the glossary if it is open.
  591. if the visible of bkgnd button "Close box" then
  592. glossaryObjects false,"zoom in"
  593. end if
  594. end mouseUp
  595.  
  596. ------‚Ä¢‚Ä¢  Function to handle the "End" or "Continue" button.  ‚Ä¢‚Ä¢------
  597.  
  598. function endOrMore
  599. -- ‚àÜ Indicate if this is the last card of a topic, or if there are
  600. -- more cards on this topic.
  601. if word 2 of bkgnd field "Pages" = word 4 of bkgnd field "Pages" then
  602. -- This is the last card of a topic.
  603. return "-----  End of Topic  -----" -- ‚àÜ
  604. else
  605. -- There are additional cards on this topic.
  606. return "---  More  ---" -- ‚àÜ
  607. end if
  608. end endOrMore
  609.  
  610. ------‚Ä¢‚Ä¢  MESSAGE HANDLERS  ‚Ä¢‚Ä¢------
  611.  
  612. on setCheckMark boolean
  613. -- Set the menu bar for this background.
  614. global AudioHelpMenu
  615. setLocationCheckMark 2,boolean
  616. if there is a menu AudioHelpMenu then
  617. if there is a menuItem 6 in menu AudioHelpMenu then
  618. if boolean then enable menuItem 6 of menu AudioHelpMenu
  619. else disable menuItem 6 of menu AudioHelpMenu
  620. end if
  621. end if
  622. end setCheckMark
  623.  
  624. on goMainTopics
  625. -- Go to the appropriate main topics card.
  626. visual effect zoom in
  627. lock screen
  628. get currentTopicInfo()
  629. put item 1 of line 1 of it into sectionNumber
  630. put item 2 of line 1 of it into topicNumber
  631. if sectionNumber is empty then go card 1
  632. else
  633. go card sectionNumber
  634. send openCard to this background
  635. -- Highlight the current topic.
  636. if topicNumber is not empty then
  637. put topicNumber into nextLine
  638. if line (topicNumber+1) of bkgnd field "Section" contains tab then
  639. -- This indicates that the section name is on two lines, so
  640. -- select both lines.
  641. add 1 to nextLine
  642. end if
  643. unlock screen
  644. selectWholeLine topicNumber,the name of bkgnd field "Section",nextLine
  645. end if
  646. end if
  647. end goMainTopics
  648.  
  649. function currentTopicInfo
  650. -- This function accesses the topic-specific information
  651. -- for the current topic. Line 1 contains a two-item record
  652. -- of the current section and topic number.
  653. if there is no background field "About this card" then return empty
  654. -- ‚àÜ Depends on "Card X of Y" format in the field
  655. put word 2 of bkgnd field "Pages" into currentPage
  656. get the number of this card
  657. put bkgnd field "About This Card" ¬¨
  658. of card (it - currentPage + 1) into aboutThisCard
  659. return aboutThisCard
  660. end currentTopicInfo
  661.  
  662. on checkActiveText
  663. -- If the text clicked is active, then show appropriate glossary info.
  664. put the clickText into thePhrase
  665. put the clickChunk into theChunkOfText
  666. get the textStyle of theChunkOfText
  667. if (thePhrase is empty) or (thePhrase is return) or ¬¨
  668. ("group" is not in the textStyle of theChunkOfText) then
  669. exit checkActiveText
  670. end if
  671. set cursor to watch
  672. select theChunkOfText
  673. --  wait 10
  674. showGlossaryItem thePhrase
  675. select empty
  676. end checkActiveText
  677.  
  678. on printTopic
  679. -- Print cards from the current topic.
  680. put the number of this card into cardNumber
  681. put 1 into total
  682. if there is a bkgnd field "Pages" then
  683. -- ‚àÜ This assumes that the second word of the bkgnd field "Pages"
  684. -- is the card number in this topic, and that the fourth word
  685. -- is the number of cards in this topic.
  686. subtract (word 2 of bkgnd field "Pages" - 1) from cardNumber
  687. put word 4 of bkgnd field "Pages" into total
  688. end if
  689. lock screen
  690. set lockMessages to true
  691. push card
  692. go card cardNumber
  693. open printing
  694. repeat total times
  695. -- Print only the content part of the card (not the navigation
  696. -- buttons at the bottom of the card).
  697. print card from 0,0 to 255,253
  698. go next card of this bkgnd
  699. end repeat
  700. close printing
  701. pop card
  702. unlock screen
  703. end printTopic
  704.  
  705. ------‚Ä¢‚Ä¢  SCRIPTS FOR HANDLING THE GLOSSARY  ‚Ä¢‚Ä¢------
  706.  
  707. on showGlossaryItem glossaryWord
  708. -- Show the Glossary field, using the appropriate text.
  709. -- glossaryWord is glossary word to be defined.
  710. set cursor to watch
  711. lock screen
  712. glossaryObjects true
  713. put empty into bkgnd field "Glossary Item"
  714. put getGlossaryItem(glossaryWord) into bkgnd field "Glossary Item"
  715. if bkgnd field "Glossary Item" is empty then
  716. -- The grouped word isn't actually in the glossary (this shouldn't
  717. -- happen).
  718. beep
  719. glossaryObjects false
  720. exit showGlossaryItem
  721. end if
  722. formatGlossaryItem
  723. unlock screen with visual effect zoom out
  724. end showGlossaryItem
  725.  
  726. on glossaryObjects boolean,theEffect
  727. -- Hide or show the objects needed for the glossary.
  728. if theEffect is not empty then lock screen
  729. set visible of bkgnd button "Glossary" to boolean -- ‚àÜ The button name.
  730. set visible of bkgnd button "Close box" to boolean -- ‚àÜ The button name.
  731. set visible of bkgnd field "Glossary Item" to boolean
  732. set the showPict of this card to not boolean
  733. if theEffect is not empty then unlock screen with theEffect
  734. end glossaryObjects
  735.  
  736. function getGlossaryItem glossaryWord
  737. -- Given a glossary word, return the entire glossary item.
  738. -- (A glossary item is the glossary word and its definition.)
  739. put offset("*" & glossaryWord,card field "Glossary" of card "Overview")¬¨
  740. into beginOffset
  741. -- beginOffset is an integer, the first character of the glossary item.
  742. if beginOffset is 0 then return empty
  743. add 1 to beginOffset -- to disregard the * character
  744. put number of chars in card field "Glossary" of card "Overview" ¬¨
  745. into charsInGlossary
  746. -- Get the offset from the beginning of the requested glossary item
  747. put offset(return & "*",char beginOffset to ¬¨
  748. charsInGlossary in card field "Glossary" of card "Overview") ¬¨
  749. into endOffset
  750. if endOffset is 0 then
  751. -- This is the last glossary item.
  752. put charsInGlossary into endOffset
  753. else
  754. -- put the char length of the requested glossary item into endOffset.
  755. put beginOffset + endOffset - 2 into endOffset
  756. end if
  757. return char beginOffset to endOffset ¬¨
  758. of card field "Glossary" of card "Overview"
  759. end getGlossaryItem
  760.  
  761. on formatGlossaryItem
  762. -- Set the visual format of the glossary item field.
  763. -- Delete the first line if it is empty.
  764. if line 1 of bkgnd field "Glossary Item" is empty then
  765. delete line 1 of bkgnd field "Glossary Item"
  766. end if
  767. -- Delete the last line if it is empty.
  768. if last line of bkgnd field "Glossary Item" is empty then
  769. delete last line of bkgnd field "Glossary Item"
  770. end if
  771. set textStyle of line 1 of bkgnd field "Glossary Item" to bold
  772. end formatGlossaryItem</script>
  773. </background>
  774.